<!--
  描述：故障现象table页
  @author chengguang
  @since 2021/11/18 17:54
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<table class="layui-hide" id="zmn-table" lay-filter="zmn-table" th:fragment="table">
    <thead>
    <tr>
        <th lay-data="{field:'phenId',type:'checkbox', width:50, unresize:true, align:'center', fixed:'left'}"></th>

        <th lay-data="{field:'sort', unresize:true, align:'center',edit:'text'}">排序</th>
        <th lay-data="{field:'phenId', unresize:true, align:'center'}">ID</th>
        <th lay-data="{field:'phenName', unresize:true, align:'center'}">故障现象名称</th>
        <th lay-data="{field:'maintainTime', unresize:true, align:'center'}">检修时长</th>
        <th lay-data="{field:'faultNameAndIds', unresize:true, align:'center',width:170}">关联故障</th>
        <th lay-data="{field:'maintainAndIds', unresize:true, align:'center',width:170}">关联检修项目</th>
        <th lay-data="{field:'status', width:80, unresize:true, align:'center'}">状态</th>
        <th lay-data="{field:'updateTime', unresize:true, align:'center'}">最近修改</th>
        <th lay-data="{field:'操作', width:200, unresize:true, align:'center', fixed:'right'}">操作</th>

    </tr>
    </thead>
    <tbody>
    <tr th:each="item:${items}">
        <td></td>
        <td th:text="${item.sort}">sort</td>
        <td th:text="${item.phenId}">phenId</td>

        <td th:text="${item.phenName}">phenName</td>
        <td th:text="${item.maintainTime}">maintainTime</td>
        <td th:text="${item.faultNameAndIds}">faultNameAndIds</td>
        <td th:text="${item.maintainAndIds}">maintainAndIds</td>
        <td>
            <input th:disabled="${(#authPermit.checkPermit('/base/phenomenon/updateStatus.action'))?'false':'true'}"
                   type="checkbox" name="status" id="status" th:key="${item.phenId}" th:value="${item.status}"
                   lay-text="ON|OFF" lay-skin="switch" lay-filter="chk_one_status"
                   th:checked="${item.status == 2}"/>
        </td>
        <td th:text="${item.updater} + '/' + ${T(com.zmn.common.utils.date.DateUtil).toString(item.updateTime)}">
            updaterAndUpdateTime
        </td>
        <td>
            <div>
                <a th:if="${#authPermit.checkPermit('/base/phenomenon/addEditView.action')}" style="color: #00a0e9"
                   class="btn-operate" th:data-id="${item.phenId}">修改</a>&nbsp;&nbsp;
                <a th:if="${#authPermit.checkPermit('/base/phenomenon/addRelateFault.action')}"
                   style="color: #00a0e9"
                   class="btn-addRelateFault"
                   th:data-id="${item.phenId}"
                >关联故障</a>&nbsp;&nbsp;
                <a th:if="${#authPermit.checkPermit('/base/phenomenon/addPhenomenonMaintain.action')}"
                   style="color: #00a0e9"
                   th:data-id="${item.phenId}"
                   class="btn-addPhenomenonMaintain">关联检修项目</a>&nbsp;&nbsp;
            </div>
        </td>
    </tr>
    </tbody>
</table>
